#=00 
#=01 yield can return a value
#=02 defaults to None
def mygen(sequence):
    iterobj = iter(sequence)
    while True:
        skip = yield iterobj.next() #01
        if skip is not None: #02
            for x in range(skip):
                discarded = iterobj.next()

gen = mygen(('a', 'b', 'skip', 'c', 'd', 'e'))
n = gen.next()
while True
    print n
#=05 yield returns None
    n = gen.next() #05
#=06 skip token 
#=07 yield returns 1
    if n == 'skip': #06
        n = gen.send(1) #07

#=09  'a', 'b', 'd', 'e'
